package org.jeecg.modules.commodity.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.commodity.entity.Commodity;
import org.jeecg.modules.commodity.model.CommodityModel;

import java.util.List;

/**
 * @Auther: zhuzhuhong
 * @Date: 2019/11/15 14:01
 * @Description:
 */
public interface CommodityService extends IService<Commodity> {

    /**
    * 根据商品名称动态模糊查询
    * @Author zhuzhuhong
    * @Date  2019/11/15
    * @param commodityName
    * @return
    */
    List<CommodityModel> findCommodityModelByCommodityName(String commodityName);

    /**
    * 根据商品编号删除商品
    * @Author zhuzhuhong
    * @Date  2019/11/15
    * @param id
    * @return
    */
    boolean deleteCommodityById(String id);

    /**
    * 根据商品名得到商品Id
    * @Author zhuzhuhong
    * @Date  2019/11/22
    * @param commodityName
    * @return
    */
    String getCommodityIdByCommodityName(String commodityName);

}
